﻿/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 *
 * The Original Code is tyzoh.jp code.
 *
 * The Initial Developer of the Original Code is Kazutaka Kurihara.
 * Portions created by the Initial Developer are Copyright (C) 2007
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * ***** END LICENSE BLOCK ***** */
//using System;
//using System.Drawing;
//using System.Windows.Forms;
//using Qurihara.Anm;
//using System.Drawing.Drawing2D;

//using NUnit.Framework;


//namespace Qurihara
//{
//    #region test
//    [TestFixture]
//    public class SlideViewTest
//    {
//        View sv;
//        [SetUp]
//        public void Init()
//        {
//            sv = new View(new Size(100,50));
//        }
//        [Test]
//        public void PropertyTest()
//        {
//            Assertion.AssertEquals(100,sv.ScreenSize.Width);
//            Assertion.AssertEquals(50,sv.ScreenSize.Height);
//            Assertion.AssertEquals(0,sv.ViewRectangle.X);
//            Assertion.AssertEquals(0,sv.ViewRectangle.Y);
//            Assertion.AssertEquals(100,sv.ViewRectangle.Width);
//            Assertion.AssertEquals(50,sv.ViewRectangle.Height);
//            sv.ScreenSize = new Size(200,100);
//            Assertion.AssertEquals(200,sv.ScreenSize.Width);
//            Assertion.AssertEquals(100,sv.ScreenSize.Height);
//            Assertion.AssertEquals(0,sv.ViewRectangle.X);
//            Assertion.AssertEquals(0,sv.ViewRectangle.Y);
//            Assertion.AssertEquals(100,sv.ViewRectangle.Width);
//            Assertion.AssertEquals(50,sv.ViewRectangle.Height);
//            sv.ViewRectangle = new Rectangle(100,50,400,200);
//            Assertion.AssertEquals(200,sv.ScreenSize.Width);
//            Assertion.AssertEquals(100,sv.ScreenSize.Height);
//            Assertion.AssertEquals(100,sv.ViewRectangle.X);
//            Assertion.AssertEquals(50,sv.ViewRectangle.Y);
//            Assertion.AssertEquals(400,sv.ViewRectangle.Width);
//            Assertion.AssertEquals(200,sv.ViewRectangle.Height);
//        }
//        [Test]
//        public void SVTransformTest()
//        {
//            Point op = new Point(80,40);
//            Point p;

//            p = op;
//            sv.ScreenToView(ref p);
//            Assertion.AssertEquals(new Point(80,40),p);

//            sv.ScreenSize = new Size(200,100);
//            p = op;
//            sv.ScreenToView(ref p);
//            Assertion.AssertEquals(new Point(40,20),p);

//            sv.ViewRectangle = new Rectangle(100,50,400,200);
//            p = op;
//            sv.ScreenToView(ref p);
//            Assertion.AssertEquals(new Point(100+400*80/200 ,50+ 200*40/100),p);
//        }
//        [Test]
//        public void VSTransformTest()
//        {
//            Point op = new Point(80,40);
//            Point p;

//            p = op;
//            sv.ViewToScreen(ref p);
//            Assertion.AssertEquals(new Point(80,40),p);

//            sv.ScreenSize = new Size(200,100);
//            p = op;
//            sv.ViewToScreen(ref p);
//            Assertion.AssertEquals(new Point(160,80),p);

//            sv.ViewRectangle = new Rectangle(100,50,400,200);
//            p = op;
//            sv.ViewToScreen(ref p);
//            Assertion.AssertEquals(new Point(-10 ,-5),p);

//        }
//        [Test]
//        public void VisibleTest1()
//        {

//            bool test;
//            Rectangle r;

//            r = new Rectangle(20,20,40,20);
//            test = sv.IsVisibleOnScreen(r);
//            Assertion.AssertEquals(true,test);
//        }
//        [Test]
//        public void VisibleTest2()
//        {

//            bool test;
//            Rectangle r;

//            sv.ScreenSize = new Size(200,100);
//            r = new Rectangle(40,40,80,40);
//            test = sv.IsVisibleOnScreen(r);
//            Assertion.AssertEquals(true,test);

//        }
//        [Test]
//        public void VisibleTest3()
//        {

//            bool test;
//            Rectangle r;

//            sv.ViewRectangle = new Rectangle(100,50,400,200);
//            r = new Rectangle(100,50,400,200);
//            test = sv.IsVisibleOnScreen(r);
//            Assertion.AssertEquals(true,test);
//        }
//        [Test]
//        public void VisibleTest4()
//        {

//            bool test;
//            Rectangle r;

//            sv.ViewRectangle = new Rectangle(100,50,400,200);
//            r = new Rectangle(100,50,400,200);
//            r.Inflate(1,1);
//            test = sv.IsVisibleOnScreen(r);
//            Assertion.AssertEquals(true,test);
//        }
//        [Test]
//        public void VisibleTest5()
//        {

//            bool test;
//            Rectangle r;

//            sv.ViewRectangle = new Rectangle(100,50,400,200);

//            r = new Rectangle(-1,0,100,50);
//            test = sv.IsVisibleOnScreen(r);
//            Assertion.AssertEquals(false,test);
			
//        }
//        [Test]
//        public void VisibleTest6()
//        {

//            bool test;
//            Rectangle r;

//            sv.ViewRectangle = new Rectangle(100,50,400,200);
//            r = new Rectangle(0,-1,100,50);
//            test = sv.IsVisibleOnScreen(r);
//            Assertion.AssertEquals(false,test);
			
//        }
//        [Test]
//        public void VisibleTest7()
//        {

//            bool test;
//            Rectangle r;

//            sv.ViewRectangle = new Rectangle(100,50,400,200);
//            r = new Rectangle(0,0,100,50);
//            test = sv.IsVisibleOnScreen(r);
//            Assertion.AssertEquals(true,test);
			
//        }
//        [Test]
//        public void VisibleTest8()
//        {

//            bool test;
//            Rectangle r;

//            sv.ViewRectangle = new Rectangle(100,50,400,200);

//            r = new Rectangle(501,250,100,50);
//            test = sv.IsVisibleOnScreen(r);
//            Assertion.AssertEquals(false,test);
			
//        }
//        [Test]
//        public void VisibleTest9()
//        {

//            bool test;
//            Rectangle r;

//            sv.ViewRectangle = new Rectangle(100,50,400,200);
//            r = new Rectangle(500,251,100,50);
//            test = sv.IsVisibleOnScreen(r);
//            Assertion.AssertEquals(false,test);
			
//        }
//        [Test]
//        public void VisibleTest10()
//        {

//            bool test;
//            Rectangle r;

//            sv.ViewRectangle = new Rectangle(100,50,400,200);
//            r = new Rectangle(500,250,100,50);
//            test = sv.IsVisibleOnScreen(r);
//            Assertion.AssertEquals(true,test);
			
//        }
//    }
//    #endregion
//}
